﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace TestClient
{
    /// <summary>
    /// Logique d'interaction pour WindowTest.xaml
    /// </summary>
    public partial class WindowTest : Window
    {
        public WindowTest()
        {
            InitializeComponent();
        }

        static string gg;



        public void button1_Click(object sender, RoutedEventArgs e)
       
        {
            Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() { Message.Text = "Enfin j'ai généré l'interface"; });
        }


        public string UpdateControl()
        {
            button1_Click(null,null);
            Dispatcher.Invoke(DispatcherPriority.Normal, (Action)delegate() { gg = Message.Text; });
            Console.Write("invocation de UpdateControl \n");
            Console.Write("La valeur2 de g est: \n" +gg);
            Console.Write("\n");
            return gg;
        }



        private void radioButton2_Checked(object sender, RoutedEventArgs e)
        {

        }

        private void checkBox1_Checked(object sender, RoutedEventArgs e)
        {

        }

        private void radioButton3_Checked(object sender, RoutedEventArgs e)
        {

        }

        private void radioButton1_Checked(object sender, RoutedEventArgs e)
        {

        }

        private void button1_Click_1(object sender, RoutedEventArgs e)
        {

        }

    }
}
